#region head comment
/*
Code generate by YhdSdkTool.
email:starpeng@vip.qq.com
2013-01-21 23:00:57:783 +08:00
*/
#endregion

using System;
using System.Xml.Serialization;
using System.Collections.Generic;
using YhdSdk.Domain;
using YhdSdk.Domain.Group;
using YhdSdk.Response.Group;

namespace YhdSdk.Request.Group
{
    /// <summary>
    /// 团购订单信息通知
    ///<para></para>
    ///<para>用户在1号商城购买团购产品，付款成功后，团购平台调用本服务，把订单信息通知到合作方的平台，成功则返回成功记录数，失败则返回失败记录数和相应错误描述信息。</para>
    /// </summary>
    public class YhdGroupBuyOrderInformRequest : IYhdRequest<YhdGroupBuyOrderInformResponse>
    {
        /// <summary>
        /// 订单号(订单编码)
        /// </summary>
        /// <example>20808047AUXD</example>
        [XmlElement("orderCode")]
        public String OrderCode
        {
            get;
            set;
        }

        /// <summary>
        /// 1号商城产品ID
        /// </summary>
        [XmlElement("productId")]
        public Int64 ProductId
        {
            get;
            set;
        }

        /// <summary>
        /// 购买数量
        /// </summary>
        [XmlElement("productNum")]
        public Int32 ProductNum
        {
            get;
            set;
        }

        /// <summary>
        /// 订单金额
        /// </summary>
        /// <example>39</example>
        [XmlElement("orderAmount")]
        public Double OrderAmount
        {
            get;
            set;
        }

        /// <summary>
        /// 购买时间(yyyy-MM-dd HH:mm:ss格式)
        /// </summary>
        [XmlElement("createTime")]
        public String CreateTime
        {
            get;
            set;
        }

        /// <summary>
        /// 支付确认时间(yyyy-MM-dd HH:mm:ss格式)
        /// </summary>
        [XmlElement("paidTime")]
        public String PaidTime
        {
            get;
            set;
        }

        /// <summary>
        /// 用户手机号(13、15或18开头的11位)
        /// </summary>
        [XmlElement("userPhone")]
        public String UserPhone
        {
            get;
            set;
        }

        /// <summary>
        /// 产品单价
        /// </summary>
        [XmlElement("productPrice")]
        public Double ProductPrice
        {
            get;
            set;
        }

        /// <summary>
        /// 合作方团购ID
        /// </summary>
        [XmlElement("outerGroupId")]
        public String OuterGroupId
        {
            get;
            set;
        }

        /// <summary>
        /// Api接口名称
        /// </summary>
        public String ApiName
        {
            get{ return "yhd.group.buy.order.inform"; }
        }

        /// <summary>
        /// 获取参数列表
        /// </summary>
        public IDictionary<string, string> GetParameters()
        {
            YhdDictionary parameters = new YhdDictionary();
            parameters.Add("orderCode" ,this.OrderCode);
            parameters.Add("productId" ,this.ProductId);
            parameters.Add("productNum" ,this.ProductNum);
            parameters.Add("orderAmount" ,this.OrderAmount);
            parameters.Add("createTime" ,this.CreateTime);
            parameters.Add("paidTime" ,this.PaidTime);
            parameters.Add("userPhone" ,this.UserPhone);
            parameters.Add("productPrice" ,this.ProductPrice);
            parameters.Add("outerGroupId" ,this.OuterGroupId);
            return parameters;
        }

        /// <summary>
        /// 验证参数
        /// </summary>
        public void Validate()
        {
            RequestValidator.ValidateRequired("orderCode", this.OrderCode);
            RequestValidator.ValidateRequired("productId", this.ProductId);
            RequestValidator.ValidateRequired("productNum", this.ProductNum);
            RequestValidator.ValidateRequired("orderAmount", this.OrderAmount);
            RequestValidator.ValidateRequired("createTime", this.CreateTime);
            RequestValidator.ValidateRequired("paidTime", this.PaidTime);
            RequestValidator.ValidateRequired("userPhone", this.UserPhone);
            RequestValidator.ValidateRequired("productPrice", this.ProductPrice);
            RequestValidator.ValidateRequired("outerGroupId", this.OuterGroupId);
        }

    }
}
